package com.liujit.bms.app.mapper;

import com.liujit.bms.app.domain.model.BlogMemberReadRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @Description 博客会员阅读记录Mapper
 * @Author liujun
 * @Date 2021-07-16 18:15:24
 */
@Mapper
public interface BlogMemberReadRecordMapper extends BaseMapper<BlogMemberReadRecord> {

    /**
     * 添加阅读量
     *
     * @param articleId
     * @return
     * @author: liujun
     * @date: 2021/7/16 6:47 下午
     */
    @Update("update blog_article set read_num = read_num + 1 where id = #{articleId}")
    Integer addReadNum(Long articleId);
}